﻿@{
    ViewBag.Title = "日常检查-查看";
    Layout = null;
}
<form method="post" action="demo/common/ajaxDone.html" class="pageForm required-validate"
onsubmit="return validateCallback(this)">
<div class="pageContent" layouth="38">
    <table class="tab01 tabNo" width="100%;">
        <tr>
            <td class="td1" style="width: 30%;">
                被检单位类型：
            </td>
            <td>
                <input name="jigou" readonly="readonly" class="input02" value="@Model.TheDailycheckInfo.Dc_TypeName" />
            </td>
        </tr>
        <tr>
            <td class="td1">
                被检单位标段：
            </td>
            <td>
                <input type="text" readonly="readonly" class="input02" value="@Model.TheDailycheckInfo.Dc_BeCheckedSection"/>
            </td>
        </tr>
        <tr>
            <td class="td1">
                被检单位：
            </td>
            <td>
                <input type="text" readonly="readonly" class="input02" value="@Model.TheDailycheckInfo.Dc_BeCheckedDepName"/>
            </td>
        </tr>
        <tr>
            <td class="td1">
                检查时间：
            </td>
            <td>
                <input name="riqi" readonly="readonly" class="input02" value="@Model.TheDailycheckInfo.Dc_CheckTime.ToString("yyyy-MM-dd")">
            </td>
        </tr>
        <tr>
            <td class="td1">
                是否存在问题：
            </td>
            <td>
                <input type="text" readonly="readonly" class="input02" id="sel_pro" value="@(Model.TheDailycheckInfo.Dc_IsPro ? "是" : "否")" />
            </td>
        </tr>
    </table>
    @if (Model.TheDailycheckInfo.Dc_IsPro)
    {
        <table class="tab01 tabNo" width="100%;">
            <tr>
                <td class="td1" style="width: 30%;">
                    问题简写：
                </td>
                <td>
                    <input name="name" type="text" size="70" readonly="readonly" class="input02" value="@Model.TheDailycheckInfo.Dc_BriefProblem">
                </td>
            </tr>
            <tr>
                <td class="td1">
                    问题详情：
                </td>
                <td>
                    <textarea name="textarea1" cols="80" rows="5" class="input05" readonly="readonly">@Model.TheDailycheckInfo.Dc_DetailsProblem</textarea>
                </td>
            </tr>
            <tr>
                <td class="td1">
                    整改期限：
                </td>
                <td>
                    <input name="riqi" type="text" class="input02" readonly="readonly" value="@(Model.TheDailycheckInfo.Dc_CorrectTime == null ? "" : Convert.ToDateTime(Model.TheDailycheckInfo.Dc_CorrectTime).ToString("yyyy-MM-dd"))">
                </td>
            </tr>
            <tr>
                <td class="td1">
                    整改要求：
                </td>
                <td>
                    <textarea name="textarea1" cols="80" rows="5" class="input05" readonly="readonly">@Model.TheDailycheckInfo.Dc_CorrectDemand</textarea>
                </td>
            </tr>
            <tr>
                <td class="td1">
                    整改反馈信息：
                </td>
                <td>
                    <textarea name="textarea1" cols="80" rows="5" class="input05" readonly="readonly">@Model.TheDailycheckInfo.Dc_FeedbackInfo</textarea>
                </td>
            </tr>
        </table>
    }
    <table class="tab01 tabNo" width="100%;">
        <tr>
            <td class="td1" style="width: 30%;">
                附件：
            </td>
            <td>
                <input id="AssistID" name="AssistID" value="@ViewBag.AssisId" type="hidden" />
                <a href='/Common/UploaderFile/Uploader/?id=ZDFileID' width="710" height="460" rel="rel_WorkFlow_WorksMeasure_Attach"
                    mask="true" target="dialog" title="附件管理">
                    <img src="/Content/themes/default/images/fj.gif" alt="查看附件" id='ZDFileID'
                             uploaderoption="{MoudleID:@ViewBag.MoudleID,'ToSelectIDs':[@ViewBag.FileIds],'ToDeleteIDs':[@ViewBag.DeleteIds],BizDeleteURL:'/SafetyConstruction/Base/Delete/',BizSaveUrl:'/SafetyConstruction/Base/BatchAdd/',BizType:'DailyCheck_Rules',BizID:'@ViewBag.AssisId','dirWhere':'@ViewBag.DirWhere'}" />
                </a>
            </td>
        </tr>
    </table>
    @if (Model.TheDailycheckInfo.Dc_IsPro)
    {
        <table class="tab01 tabNo" width="100%;">
            <tr>
                <td class="td1" style="width: 30%;">
                    审批流程：
                </td>
                <td>
                    <a href="@Url.Action("DailyCheckApprovalProcess", "ScmDailyCheck", new { type = Model.TheDailycheckInfo.Dc_TypeCode, state = Model.TheDailycheckInfo.Dc_State })" mask="true" target="dialog" width="425" height="600" title="点击查看当前审批步骤" style="color: blue; line-height: 25px;">
                        查看当前审批步骤</a>
                </td>
            </tr>
        </table>
        <div class="panelBar">
            <ul class="toolBar">
                <li class="nobg"><b>审批情况</b> </li>
            </ul>
        </div>
        <table class="table" width="100%">
            <thead>
                <tr style="text-align: center;">
                    <th>
                        审批部门
                    </th>
                    <th>
                        审批人
                    </th>
                    <th>
                        审批时间
                    </th>
                    <th>
                        审批
                    </th>
                    <th>
                        审批意见
                    </th>
                </tr>
            </thead>
            <tbody>
                @foreach (ScmAuditInfo item in Model.TheAuditList)
                {
                    <tr style="text-align: center;">
                        <td>@item.A_DepName
                        </td>
                        <td>@item.A_ManName
                        </td>
                        <td>@item.A_Time.ToString("yyyy-MM-dd HH:mm:ss")
                        </td>
                        <td>@(item.A_IsApproved ? "审批通过" : "审批不通过")
                        </td>
                        <td>@item.A_Opinion
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    }
</div>
<div class="formBar">
    <ul>
        <li>
            <button type="button" class="close btn btn-default btn-sm">
                关闭</button>
        </li>
    </ul>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        if ($("#sel_pro").val() == "是") {
            $.pdialog.resizeDialog({ style: { height: 500, top: 120} }, $.pdialog.getCurrent(), "");
            $.pdialog.switchDialog($.pdialog.getCurrent());
        };
    });
</script>
</form>
